<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE xsl:stylesheet [
  <!ENTITY nbsp "&#x00A0;">
]>
<xsl:stylesheet
	version="1.0"
	xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
	xmlns:msxml="urn:schemas-microsoft-com:xslt"
	xmlns:umbraco.library="urn:umbraco.library" xmlns:Exslt.ExsltCommon="urn:Exslt.ExsltCommon" xmlns:Exslt.ExsltDatesAndTimes="urn:Exslt.ExsltDatesAndTimes" xmlns:Exslt.ExsltMath="urn:Exslt.ExsltMath" xmlns:Exslt.ExsltRegularExpressions="urn:Exslt.ExsltRegularExpressions" xmlns:Exslt.ExsltStrings="urn:Exslt.ExsltStrings" xmlns:Exslt.ExsltSets="urn:Exslt.ExsltSets"
	exclude-result-prefixes="msxml umbraco.library Exslt.ExsltCommon Exslt.ExsltDatesAndTimes Exslt.ExsltMath Exslt.ExsltRegularExpressions Exslt.ExsltStrings Exslt.ExsltSets ">


  <xsl:output method="xml" omit-xml-declaration="yes"/>

  <xsl:param name="currentPage"/>

  <xsl:template match="/">

    <!-- start writing XSLT -->
    <xsl:value-of select="umbraco.library:RegisterStyleSheetFile('uTubeCSS', '/css/mp3play/Mp3Player.css')"/>
    <xsl:value-of select="umbraco.library:RegisterJavaScriptFile('jquery', '/scripts/jmp3/jquery-1.7.2.min.js')"/>
    <xsl:value-of select="umbraco.library:RegisterJavaScriptFile('jquery_jmp3', '/scripts/jmp3/jquery.jmp3.js')"/>
    <xsl:value-of select="umbraco.library:RegisterJavaScriptFile('jquery_control', '/scripts/jmp3/mp3playerControl.js')"/>
        <div id="music-player">
          <div id="music-list">
            <ul>
              <xsl:for-each select="$currentPage/ancestor-or-self::*[@level=1]/Mp3DocumentType">
                <xsl:variable name="mediaId" select="mp3"/>
                <xsl:variable name="media" select="umbraco.library:GetMedia($mediaId, 0)"/>
                <a href="javascript:void(0);" ondblclick="playmedia('{$media/umbracoFile}')">
                  <li class="playerlist">
                    <table cellpadding="0" cellspacing="0" style="font-size:12px">
                      <tr>
                        <td class="playermini">
                          <img id="{$media/umbracoFile}" with="27" height="22" src="/css/mp3play/images/stop.png" onclick="playmediamini('{$media/umbracoFile}')" style="border:none;"/>
                        </td>
                        <td>
                          <xsl:value-of select="title"/>---<xsl:value-of select="speaker"/>
                        </td>
                      </tr>
                      <tr class="hiddenlist">
                        <td></td>
                        <td>
                          <small>
                            <xsl:value-of select="series"/>
                          </small>
                        </td>
                      </tr>
                      <tr class="hiddenlist">
                        <td></td>
                        <td>
                          <small>
                            <xsl:value-of select="summary"/>
                          </small>
                        </td>
                      </tr>
                    </table>
                  </li>
                </a>
              </xsl:for-each>
            </ul>
          </div>
          <div id="player-plugin-hidden"  class="mp3player">
            <iframe src="../scripts/jmp3/singlemp3player.swf?showDownload=false" id="mp3player-iframe" width="300px" height="30px" frameborder="0" scrolling="no"></iframe>
          </div>
        </div>
  </xsl:template>

</xsl:stylesheet>